package top.fongs.spring_security_jwt.web.controllers.admin;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping( "admin" )
public class AdminController {

    @PreAuthorize( "hasRole('ROLE_ADMIN')" )
    @RequestMapping( "get" )
    public Object get( ) {
        return "success";
    }
}
